import { Outlet, Navigate, useLocation } from "umi"
import { isLogin } from "@/utils"
export default function Auth() {
  const location = useLocation();
  return (
    <>
      {
        isLogin()
        ?
        <Outlet/>
        :
        <Navigate to="/login" replace state={{from: location.pathname}}/>
      }
      
    </>
  )
}
